define(["dijit/form/SimpleTextarea", 
        "dijit/form/ValidationTextBox",
        "dojo/_base/declare"],
		function(SimpleTextarea, ValidationTextBox, declare){
	
	return declare(
		    "custom.dijit.ValidationTextarea",
		    [ValidationTextBox,SimpleTextarea],
		    {
		        postCreate: function() {
		            this.inherited(arguments);
		        },
		        validate: function() {
		        	if (arguments.length===0) {
		        	return this.validate(false);
		        	}
		        	return this.inherited(arguments);
		        },
		        onFocus: function() {
		            if (!this.isValid()) {
		                this.displayMessage(this.getErrorMessage());
		            }
		        },
		        onBlur: function() {
		            this.validate(false);
		        }
		     }
		);
});
